import Vue from 'vue'
import VueRouter from 'vue-router'
Vue.use(VueRouter)
import UserList from '../components/userlist/User-List.vue'
import UserDetail from '../components/userdetail/User-Detail.vue'

const router = new VueRouter({
    routes: [
        { path: '/', redirect: '/users', },
        {
            path: '/users',
            component: UserList
        },
        { path: '/users/:id', component: UserDetail, props: true }
    ]
})
export default router